package Eyjafjalla.modifier;

import Eyjafjalla.helper.EyjafjallaHelper;
import Eyjafjalla.modcore.EyjafjallaTag;
import Eyjafjalla.patch.CloudPatch;
import basemod.abstracts.AbstractCardModifier;
import com.megacrit.cardcrawl.cards.AbstractCard;

public class FireMarkMod extends AbstractCardModifier {
    public static String ID = "eyjafjalla:FireMarkModifier";

    public FireMarkMod(){}

    @Override
    public boolean shouldApply(AbstractCard card) {
        //只会标记【可以】标记但【未被】标记的牌
        if(!card.hasTag(EyjafjallaTag.UNLIMITED_FIRE_EYJAFJALLA))
            return !CloudPatch.CloudField.isFire.get(card) && CloudPatch.CloudField.showFire.get(card);
        //不绝炎息可以无限标记
        return true;
    }

    @Override
    public void onInitialApplication(AbstractCard card) {
        EyjafjallaHelper.markCardToFire(card,1);
    }

    @Override
    public void onRemove(AbstractCard card) {
        EyjafjallaHelper.unmarkCardToFire(card);
    }

    @Override
    public AbstractCardModifier makeCopy() {
        return new FireMarkMod();
    }

    @Override
    public String identifier(AbstractCard card) {
        return ID;
    }
}
